using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Core_HGUI_TextLineInfo_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Core.HGUI.TextLineInfo);

            field = type.GetField("CharStart", flag);
            app.RegisterCLRFieldGetter(field, get_CharStart_0);
            app.RegisterCLRFieldSetter(field, set_CharStart_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_CharStart_0, AssignFromStack_CharStart_0);
            field = type.GetField("CharEnd", flag);
            app.RegisterCLRFieldGetter(field, get_CharEnd_1);
            app.RegisterCLRFieldSetter(field, set_CharEnd_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_CharEnd_1, AssignFromStack_CharEnd_1);
            field = type.GetField("Width", flag);
            app.RegisterCLRFieldGetter(field, get_Width_2);
            app.RegisterCLRFieldSetter(field, set_Width_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_Width_2, AssignFromStack_Width_2);
            field = type.GetField("fontSize", flag);
            app.RegisterCLRFieldGetter(field, get_fontSize_3);
            app.RegisterCLRFieldSetter(field, set_fontSize_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_fontSize_3, AssignFromStack_fontSize_3);
            field = type.GetField("High", flag);
            app.RegisterCLRFieldGetter(field, get_High_4);
            app.RegisterCLRFieldSetter(field, set_High_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_High_4, AssignFromStack_High_4);
            field = type.GetField("topY", flag);
            app.RegisterCLRFieldGetter(field, get_topY_5);
            app.RegisterCLRFieldSetter(field, set_topY_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_topY_5, AssignFromStack_topY_5);
            field = type.GetField("downY", flag);
            app.RegisterCLRFieldGetter(field, get_downY_6);
            app.RegisterCLRFieldSetter(field, set_downY_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_downY_6, AssignFromStack_downY_6);
            field = type.GetField("Left", flag);
            app.RegisterCLRFieldGetter(field, get_Left_7);
            app.RegisterCLRFieldSetter(field, set_Left_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_Left_7, AssignFromStack_Left_7);
            field = type.GetField("Right", flag);
            app.RegisterCLRFieldGetter(field, get_Right_8);
            app.RegisterCLRFieldSetter(field, set_Right_8);
            app.RegisterCLRFieldBinding(field, CopyToStack_Right_8, AssignFromStack_Right_8);
            field = type.GetField("minY", flag);
            app.RegisterCLRFieldGetter(field, get_minY_9);
            app.RegisterCLRFieldSetter(field, set_minY_9);
            app.RegisterCLRFieldBinding(field, CopyToStack_minY_9, AssignFromStack_minY_9);
            field = type.GetField("maxY", flag);
            app.RegisterCLRFieldGetter(field, get_maxY_10);
            app.RegisterCLRFieldSetter(field, set_maxY_10);
            app.RegisterCLRFieldBinding(field, CopyToStack_maxY_10, AssignFromStack_maxY_10);
            field = type.GetField("Row", flag);
            app.RegisterCLRFieldGetter(field, get_Row_11);
            app.RegisterCLRFieldSetter(field, set_Row_11);
            app.RegisterCLRFieldBinding(field, CopyToStack_Row_11, AssignFromStack_Row_11);

            app.RegisterCLRMemberwiseClone(type, PerformMemberwiseClone);

            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Core.HGUI.TextLineInfo());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Core.HGUI.TextLineInfo[s]);


        }

        static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList<object> __mStack, ref huqiang.Core.HGUI.TextLineInfo instance_of_this_method)
        {
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            switch(ptr_of_this_method->ObjectType)
            {
                case ObjectTypes.Object:
                    {
                        __mStack[ptr_of_this_method->Value] = instance_of_this_method;
                    }
                    break;
                case ObjectTypes.FieldReference:
                    {
                        var ___obj = __mStack[ptr_of_this_method->Value];
                        if(___obj is ILTypeInstance)
                        {
                            ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method;
                        }
                        else
                        {
                            var t = __domain.GetType(___obj.GetType()) as CLRType;
                            t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method);
                        }
                    }
                    break;
                case ObjectTypes.StaticFieldReference:
                    {
                        var t = __domain.GetType(ptr_of_this_method->Value);
                        if(t is ILType)
                        {
                            ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method;
                        }
                        else
                        {
                            ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method);
                        }
                    }
                    break;
                 case ObjectTypes.ArrayReference:
                    {
                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as huqiang.Core.HGUI.TextLineInfo[];
                        instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
                    }
                    break;
            }
        }


        static object get_CharStart_0(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).CharStart;
        }

        static StackObject* CopyToStack_CharStart_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).CharStart;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_CharStart_0(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.CharStart = (System.Int32)v;
            o = ins;
        }

        static StackObject* AssignFromStack_CharStart_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @CharStart = ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.CharStart = @CharStart;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_CharEnd_1(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).CharEnd;
        }

        static StackObject* CopyToStack_CharEnd_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).CharEnd;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_CharEnd_1(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.CharEnd = (System.Int32)v;
            o = ins;
        }

        static StackObject* AssignFromStack_CharEnd_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @CharEnd = ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.CharEnd = @CharEnd;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Width_2(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).Width;
        }

        static StackObject* CopyToStack_Width_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).Width;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Width_2(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.Width = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Width_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Width = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.Width = @Width;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_fontSize_3(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).fontSize;
        }

        static StackObject* CopyToStack_fontSize_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).fontSize;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_fontSize_3(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.fontSize = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_fontSize_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @fontSize = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.fontSize = @fontSize;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_High_4(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).High;
        }

        static StackObject* CopyToStack_High_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).High;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_High_4(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.High = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_High_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @High = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.High = @High;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_topY_5(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).topY;
        }

        static StackObject* CopyToStack_topY_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).topY;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_topY_5(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.topY = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_topY_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @topY = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.topY = @topY;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_downY_6(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).downY;
        }

        static StackObject* CopyToStack_downY_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).downY;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_downY_6(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.downY = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_downY_6(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @downY = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.downY = @downY;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Left_7(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).Left;
        }

        static StackObject* CopyToStack_Left_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).Left;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Left_7(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.Left = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Left_7(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Left = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.Left = @Left;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Right_8(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).Right;
        }

        static StackObject* CopyToStack_Right_8(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).Right;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Right_8(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.Right = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Right_8(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Right = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.Right = @Right;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_minY_9(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).minY;
        }

        static StackObject* CopyToStack_minY_9(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).minY;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_minY_9(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.minY = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_minY_9(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @minY = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.minY = @minY;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_maxY_10(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).maxY;
        }

        static StackObject* CopyToStack_maxY_10(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).maxY;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_maxY_10(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.maxY = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_maxY_10(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @maxY = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.maxY = @maxY;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Row_11(ref object o)
        {
            return ((huqiang.Core.HGUI.TextLineInfo)o).Row;
        }

        static StackObject* CopyToStack_Row_11(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextLineInfo)o).Row;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Row_11(ref object o, object v)
        {
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.Row = (System.Int32)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Row_11(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @Row = ptr_of_this_method->Value;
            huqiang.Core.HGUI.TextLineInfo ins =(huqiang.Core.HGUI.TextLineInfo)o;
            ins.Row = @Row;
            o = ins;
            return ptr_of_this_method;
        }


        static object PerformMemberwiseClone(ref object o)
        {
            var ins = new huqiang.Core.HGUI.TextLineInfo();
            ins = (huqiang.Core.HGUI.TextLineInfo)o;
            return ins;
        }


    }
}
